<% content_for :left_sidebar do  %>
  <%= render :partial => "layouts/sidebar/xiwenguanli" %>
<% end %>
<%- model_class = NewMedium -%>
<div class="page-header">
  <h1>新媒体入口 - 列表</h1>
</div>
<table class="table table-striped">
  <thead>
    <tr>
      <th>ID</th>
      <th>名字</th>
      <th>链接地址</th>
      <th>默认图标</th>
      <th>默认图标</th>
      <th>位置</th>
      <th>操作</th>
    </tr>
  </thead>
  <tbody>
    <% @new_media.each do |new_medium| %>
      <tr>
        <td><%= link_to new_medium.id, admins_new_medium_path(new_medium) %></td>
        <td><%=raw truncate(new_medium.name,length:16) %></td>
        <td><%= new_medium.link_url[0..20] %></td>
        <td> 
          <%= image_tag(new_medium.mouse_on_image_url, :width => 75, :height => 75) %> 
        </td>
        <td> 
          <%= image_tag(new_medium.mouse_off_image_url, :width => 75, :height => 75) %> 
        </td>
        <td> 
          <%=  new_medium.postion_num %> 
        </td>
        <td>
          <a class="btn btn-default btn-xs" href="/admins/new_media/<%= new_medium.id %>/edit"><span class="translation_missing" title="translation missing: zh-CN.helpers.links.edit">编辑</span></a>
          <a class="btn btn-xs btn-danger" data-confirm="Are you sure?" data-method="delete" href="/admins/new_media/<%= new_medium.id %>" rel="nofollow"><span class="translation_missing" title="translation missing: zh-CN.helpers.links.destroy">删除</span></a>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>


<a class="btn btn-primary" href="/admins/new_media/new"><span class="translation_missing" title="translation missing: zh-CN.helpers.links.new">新增</span></a>